A networking switch receives data packets from a number of ingress ports connected to the switch and provides the data packets to a number of egress ports connected to the switch. The switch determines the egress port to which the data packets are provided dependent on the destination address included in the data packet.
Typically, a destination is connected through one physical link to one egress port in the switch. A data packet received at an ingress port for the destination is forwarded through the switch to the egress port. The destination may be a computer, another switch or a router.
To increase the bandwidth to a destination; that is, the number of data packets that can be forwarded through the switch to a destination, the destination may be connected to more than one egress port through multiple physical links with each physical link terminating at an egress port. The multiple physical links are members of a logical link between the switch and the destination.
Providing multiple physical links to a destination is called link aggregation or trunking. Link aggregation for IEEE 802.3 is described in tutorials published by the IEEE 802.3ad group at http://grouper.ieee.org/groups/802/3/trunk-study/tutorial.
A data packet arriving at an ingress port in the switch may be forwarded through the switch on any one of the physical links in the logical link to the destination. Thus, link bandwidth is increased because data packets for a destination are distributed amongst the physical links. To achieve maximum bandwidth utilization on the logical link, data packets to the destination must be evenly distributed amongst the physical links to the destination.
However, when distributing received data packets amongst the physical links, data packets for a data flow cannot be mis-ordered through the switch.
A switch includes a logical link connecting a destination to the switch. The logical link includes physical links. The system assumes that flow hash logic in the switch indexes a flow hash dependent on a data flow encoded in the received data. Trunk port selector logic in the switch selects a trunk port entry dependent on the flow hash. The trunk port entry selects the physical link on which to forward the received data to the destination.
The data flow is encoded in the destination and source addresses stored in a header in the received data. The source and destination addresses may be Ethernet source and destination addresses, IP source and destination addresses, UDP source and destination port addresses or TCP source and destination port addresses.
The switch includes vector combine logic which selects a port in the switch corresponding to the physical link. The port is selected dependent on a combination of a logical port forward vector and the trunk port entry.